<%@page import="com.ibm.eg.cvmanager.dto.Interview"%>
<%@page import="java.util.List"%>
<%@page import="com.ibm.eg.cvmanager.business.stub.InterviewBusinessImpl"%>
<%@page import="com.ibm.eg.cvmanager.business.interfaces.InterviewBusiness"%>
<%@page import="com.ibm.eg.cvmanager.dto.INTERVIEW_STATUS"%>
<%@page import="java.sql.Date"%>

<%@ page language="java" contentType="text/html; charset=windows-1256" pageEncoding="windows-1256"%>

<%
InterviewBusiness business = new InterviewBusinessImpl();

String state = request.getParameter("state");

int from_day = Integer.parseInt(request.getParameter("from_day"));
int from_month = Integer.parseInt(request.getParameter("from_month")) - 1;
int from_year = Integer.parseInt(request.getParameter("from_year")) - 1900;

int to_day = Integer.parseInt(request.getParameter("to_day"));
int to_month = Integer.parseInt(request.getParameter("to_month")) - 1;
int to_year = Integer.parseInt(request.getParameter("to_year")) - 1900;
	
if(state.equals("none")) {
	session.setAttribute("interviews", business.filterInterviews(new Date(from_year, from_month, from_day), new Date(to_year, to_month, to_day)));
} else {
	session.setAttribute("interviews", business.filterInterviews(new Date(from_year, from_month, from_day), new Date(to_year, to_month, to_day), INTERVIEW_STATUS.valueOf(state)));
}
%>

<jsp:include page="listInterviews.jsp"></jsp:include>